package com.springcloud.eshop.product.controller;

import com.springcloud.eshop.product.rabbitmq.RabbitmqProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Desc:
 * @Date: 2020-06-29
 * @Version:v1.0
 */
@RestController
public class RabbitmqController {

    @Autowired
    private RabbitmqProducer rabbitmqProducer;

    @GetMapping("/sendMessage")
    public String sendMessage(String message) {
        rabbitmqProducer.sendMessage(message);
        return "{\"success\", \"true\"}";
    }
}
